package com.yunchang.springboot.mapper.mwsreport;

import com.yunchang.springboot.models.mwsreportbean.MwsRemovalShipmentDetailDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 亚马逊api获取移除货件详情表 Mapper 接口
 * </p>
 *
 * @author sjd
 * @since 2020-08-21
 */
public interface IMwsRemovalShipmentDetailMapper extends BaseMapper<MwsRemovalShipmentDetailDO> {
    /**
     * 根据createTime获取对应的数据
     * @param time
     * @return
     */
    List<MwsRemovalShipmentDetailDO> selectByCreateTime(String time);

    /**
     * 根据是否生成财务数据获取对应的数据，limitValue用于指定获取数据的大小
     * @param financeStatus
     * @param limitValue
     * @param date
     * @return
     */
    List<MwsRemovalShipmentDetailDO> selectByFinanceStatus(@Param("financeStatus") Integer financeStatus, @Param("limitValue") Integer limitValue, @Param("date") String date);

    /**
     * 根据mwsRemovalShipmentDetailList对象集合更新financeStatus
     * @param mwsRemovalShipmentDetailList
     * @return
     */
    int updateFinanceStatusByMwsRemovalShipmentDetailList(@Param("mwsRemovalShipmentDetailList") List<MwsRemovalShipmentDetailDO> mwsRemovalShipmentDetailList);

    /**
     * 根据MwsRemovalShipmentDetail属性：shipmentDate、orderId、sku、disposition、trackingNumber、sellerId、area、fnSku获取对象
     * @param MwsRemovalShipmentDetail
     * @return
     */
    MwsRemovalShipmentDetailDO selectByMwsRemovalShipmentDetailAttribute(MwsRemovalShipmentDetailDO MwsRemovalShipmentDetail);
}
